<!DOCTYPE html>
<#assign dicSelect = JspTaglibs["http://www.casic304.cn/dicSelect"]/>
<#assign f = JspTaglibs["http://www.casic304.cn/f"] />
<#assign SourceDept = JspTaglibs["http://www.casic304.cn/SourceDept"]/>
<head>
    <meta charset="utf-8">
    <title>评审会</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${ctx}/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/iconfont/iconfont.css"/>
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/style/qbdms.css">
    <script type="text/javascript">
        var __ctx = "${ctx}";
    </script>
</head>
<body class="">
<div class="">
    <div class="layui-table-view-body">
        <table id="wQbdTecTopicreviewTable" lay-filter="wQbdTecTopicreviewTable"></table>
    </div>
</div>
<!-- 列表头部工具栏 -->
<script type="text/html" id="wQbdTecTopicreviewHeaderToolsBar">
    <div class="ccpui-enterSel">
        <form class="layui-form" action="" lay-filter="wQbdTecTopicreviewQueryForm" >
            <div class="layui-form-body selch">
                <div class="table-top-filter layui-row">
                    <div class=" layui-col-md12 layui-col-sm12" >
                        <label class="layui-form-label">会议名称</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input filter-value" name="Q_fMeetingname_SL" placeholder="请输入"/>
                        </div>
                    </div>
                </div>
                <div class="selchBtn">
                    <a class="layui-btn layui-btn-sm fillBtn" lay-event="query">
                        <span>查询</span>
                    </a>
                    <div class="layui-btn-group">
                        <button type="button" class="layui-btn layui-btn-sm" lay-event="clears" style="width: 28px;font-size: 12px;padding: 0">
                            <i class="iconfont data-iconcommon_refresh"></i>
                        </button>
                    </div>
                </div>
<!--                    <div class="table-filter-alone">-->
<!--                        <label class="layui-form-label">课题名称</label>-->
<!--                        <input type="text" class="layui-input filter-value" name="Q_fTopicname_SL" placeholder="请输入"/>-->
<!--                    </div>-->
            </div>
        </form>
    </div>

</script>
<!-- 右侧工具栏 -->
<script type="text/html" id="wQbdTecTopicreviewRightToolsBar">
    <a class="RightBtn" lay-event="particulars">详情</a>
</script>
<script src="${ctx}/qbdmsStatic/public/configFile.js"></script>
<script src="${ctx}/layui/layui.js"></script>
<script>
    //一般直接写在一个js文件中
    layui.config({
        base: serverPath.qbdmsPath + staticPath.qbdmsPath //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index','table', 'form', 'common','publicMethods','jquery','laydate', 'layer'], function () {
        var table = layui.table;
        var setter = layui.setter;
        var form = layui.form;
        var common = layui.common;
        var $ = layui.jquery;
        var layer = layui.layer;
        var publicMethods=layui.publicMethods;
        // common.tableSort('wQbdTecTopicreviewTable');
        common.tableSort('wQbdTecTopicreviewTable');
        var tableH = publicMethods.tabHeight();
        var currentSystemLevel = "${currentSystemLevel}";
        var commonCols = [{type: 'checkbox', fixed: 'left'},
            {field: 'fMeetingname', title: '会议名称', sort: true, sortname: 'f_meetingname',width:'20%'}
            , {
                field: 'fMeetingdate', title: '会议时间', sort: true, sortname: 'f_meetingdate', width:'20%',templet: function (d) {
                    return publicMethods.timeData(d.fMeetingdate);
                }
            }
            , {field: 'fMeetingaddress', title: '会议地点', sort: true, sortname: 'f_meetingaddress',width:'20%'}
            , {field: 'fOrganizingman', title: '组织人', sort: true, sortname: 'f_organizingman',width:'20%'}
            , {field: 'fChdw', title: '参会单位', sort: true, sortname: 'f_chdw',width:'20%'}
            // , {field: 'fConferencepersonnel', title: '会务人员及联系方式', sort: true, sortname: 'f_conferencepersonnel',width:'20%'}
            ];
        var hideCols = [
            , {field: 'fTopicname', title: '课题名称', sort: true, sortname: 'f_topicname', hide: true}
            , {field: 'fMeetingnotice', title: '会议通知', sort: true, sortname: 'f_meetingnotice', hide: true}

        ];
        var manageCols = [{
            fixed: 'right',
            width: '10%',
            title: '管理',
            toolbar: '#wQbdTecTopicreviewRightToolsBar'

        }];
        var diyCols = [];
        var totalCols = [];
        totalCols = totalCols.concat(commonCols).concat(hideCols).concat(diyCols).concat(manageCols);

        //第一个实例
        table.render({
            elem: '#wQbdTecTopicreviewTable'
            , height: tableH
            , url: serverPath.qbdmsPath + '/qbdms/wQbdTecTopicreview/list?fTopicnameid='+ '${did}' +'&mark=review'
            ,page: publicMethods.pageFun() //开启分页
            ,limit: 20
            ,defaultToolbar: ['']
            , toolbar: '#wQbdTecTopicreviewHeaderToolsBar'
            , method: 'post'
            , autoSort: false //是否排序
            , cols: [totalCols], done: function () {
                common.tableSelectCon('.ccpui-enterSel .layui-form input', 'a[lay-event=query]', '.ccpui-enterSel');
            }
        });
        dateReflash();

        function dateReflash() {
            publicMethods.reflashDate({startName: '.start_time1', endName: '.end_time1'});
        }

        function reflashQuery(isClear) {
            common.tableConditionRender("wQbdTecTopicreviewTable", "wQbdTecTopicreviewQueryForm", {where: {}}, isClear,false,20);
            var originOrgList = eval('${originOrgList}'); //数据来源单位
            common.initDicData("Q_filldeptid_S", originOrgList, "");
        }

        table.on('toolbar(wQbdTecTopicreviewTable)', function (obj) {
            var checkStatus = table.checkStatus(obj.config.id);
            var data = checkStatus.data;
            var _this = this;
            switch (obj.event) {
                case "query":
                    reflashQuery(false);
                    dateReflash();
                    break;
                case "clears":
                    reflashQuery(true);
                    dateReflash();
                    break;
            }
            ;
        });

        table.on('tool(wQbdTecTopicreviewTable)', function (obj) {
            var data = obj.data, //获得当前行数据
                layEvent = obj.event; //获得 lay-event 对应的值
            var layerH=publicMethods.layHeight(parent.document.getElementsByClassName('listBody')[0]);
            switch (layEvent) {
                case "particulars":
                    parent.layer.open({
                        type: 2,
                        moveOut :true,
                        area: ['80%', layerH],
                        // btn:['关闭'],
                        move:false,
                        title: ['详情'],
                        content: serverPath.qbdmsPath + '/qbdms/wQbdTecTopicreview/view/particulars?id='+data.id+'&mark=review'
                    });
                    break;
            }
        });


        window.Initialization = function () {
            reflashQuery(false);
            dateReflash();
        };
        /*刷新时间控件*/
        dateReflash();
        // common.tableSort("wQbdTecTopicreviewTable", {show: window.Initialization});
        var originOrgList = eval('${originOrgList}'); //数据来源单位
        common.initDicData("Q_filldeptid_S", originOrgList, "");
        // form.render();
    });
</script>
</body>
</html>